<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用户身体数据')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-userBodyData-edit" th:object="${userBodyData}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">用户ID：</label>
                <div class="col-sm-8">
                    <input name="userId" th:field="*{userId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">记录时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="date" th:value="${#dates.format(userBodyData.date, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">身高：</label>
                <div class="col-sm-8">
                    <input name="height" th:field="*{height}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">体重：</label>
                <div class="col-sm-8">
                    <input name="weight" th:field="*{weight}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">头围：</label>
                <div class="col-sm-8">
                    <input name="headCircum" th:field="*{headCircum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">颈围：</label>
                <div class="col-sm-8">
                    <input name="neckCircum" th:field="*{neckCircum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">胸围：</label>
                <div class="col-sm-8">
                    <input name="chestCircum" th:field="*{chestCircum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">腰围：</label>
                <div class="col-sm-8">
                    <input name="waistCircum" th:field="*{waistCircum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">臀围：</label>
                <div class="col-sm-8">
                    <input name="hipCircum" th:field="*{hipCircum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">肩宽：</label>
                <div class="col-sm-8">
                    <input name="shoulderWidth" th:field="*{shoulderWidth}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">臂长：</label>
                <div class="col-sm-8">
                    <input name="armLength" th:field="*{armLength}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">手宽：</label>
                <div class="col-sm-8">
                    <input name="handWidth" th:field="*{handWidth}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">手长：</label>
                <div class="col-sm-8">
                    <input name="handLength" th:field="*{handLength}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">腿长：</label>
                <div class="col-sm-8">
                    <input name="legLength" th:field="*{legLength}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">脚长：</label>
                <div class="col-sm-8">
                    <input name="footLength" th:field="*{footLength}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">脚宽：</label>
                <div class="col-sm-8">
                    <input name="footWidth" th:field="*{footWidth}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">测量设备：</label>
                <div class="col-sm-8">
                    <input name="measureDevice" th:field="*{measureDevice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">测量方式：</label>
                <div class="col-sm-8">
                    <input name="measureMode" th:field="*{measureMode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">测量位置：</label>
                <div class="col-sm-8">
                    <input name="measureLocation" th:field="*{measureLocation}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">测量说明：</label>
                <div class="col-sm-8">
                    <input name="measureExplain" th:field="*{measureExplain}" class="form-control" type="text">
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "product/userBodyData";
        $("#form-userBodyData-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/saveOrUpdate", $('#form-userBodyData-edit').serialize());
            }
        }

        $("input[name='date']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>